home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / misc / amag / AM9402_2.lha / tips & tricks / busypointer.c next >
C/C++ Source or Header  |  1993-12-27  |  1KB  |  42 lines

  1. #include <exec/types.h>
  2. #include <intuition/intuitionbase.h>
  3. #include <intuition/intuition.h>
  4.  
  5. #include <proto/intuition.h>
  6.  
  7. __chip UWORD BusySprite[]=
  8. {
  9.   0x0000,0x0000, 0x0400,0x07C0,
  10.   0x0000,0x07C0, 0x0100,0x0380,
  11.   0x0000,0x07E0, 0x07C0,0x1FF8,
  12.   0x1FF0,0x3FEC, 0x3FF8,0x7FDE,
  13.   0x3FF8,0x7FBE, 0x7FFC,0xFF7F,
  14.   0x7EFC,0xFFFF, 0x7FFC,0xFFFF,
  15.   0x3FF8,0x7FFE, 0x3FF8,0x7FFE,
  16.   0x1FF0,0x3FFC, 0x07C0,0x1FF8,
  17.   0x0000,0x07E0, 0x0000,0x0000
  18. };
  19.  
  20. void BusyOn (struct Window *BusyMe);
  21. void BusyOff (struct Window *BusyMe);
  22.  
  23. void BusyOn (struct Window *BusyMe)
  24. {
  25.   if (IntuitionBase->LibNode.lib_Version >= 39)
  26.     SetWindowPointer(BusyMe,WA_BusyPointer,
  27.                      -1,TAG_DONE);
  28.   else
  29.     SetPointer(BusyMe,BusySprite,
  30.            sizeof(BusySprite)/(sizeof(UWORD)*2)-2,
  31.               15,-6,0);
  32. }
  33.  
  34. void BusyOff (struct Window *BusyMe)
  35. {
  36.   if (IntuitionBase->LibNode.lib_Version >= 39)
  37.     SetWindowPointer(BusyMe,WA_BusyPointer,
  38.                      0,TAG_DONE);
  39.   else
  40.     ClearPointer (BusyMe);
  41. }
  42.